<html>
    <head>
        <link href="style3.css" rel="stylesheet" type="text/css" />
        <title></title>
    </head>
    <body>
<?php
include ("functions.php");
if(isset($_GET['conference_id'])){ // checking if the paper id and title and the conference id are passed from the previous
        // saving these values in variables
        $id = intval($_GET['paper_id']);
		$confid=intval($_GET['conference_id']);
		$title = get_paper_title($id);


	 print "<h1>{$title}</h1>"; //printing the paper's title as the header of the page

	 //estsblishing a database connection
		$conn = @mysql_connect("localhost" , "root", "") or die(mysql_error());
     mysql_select_db("mydb") or die ("here".mysql_error());

  //execute the query that gets all the data needed from the database
$get_data = mysql_query("SELECT first_name , last_name
                 FROM  Member m , assigned_papers a
                 WHERE m.member_id = a.member_id
                 AND a.paper_id= $id ;") or die(mysql_error());

				
     if (mysql_num_rows($get_data) == 0) {
       echo "there are no reviewers assigned to this paper ";
	   
    } else if (mysql_num_rows($get_data) > 1) {
	
     echo '<table width="100%">
                <tr>
                    <td><b>reviewers</b></td>


                </tr>';
        //Print each reviewer's name
        while($row = mysql_fetch_assoc($get_data)) {
            echo "
                <tr>
                    <td>{$row['first_name']} {$row['last_name']}</td>
                    </tr>";
       }
        // Close table
        echo '</table>';

		}
		}
		else
	echo "problem";
